.class final Lcom/a0soft/gphone/app2sd/a/k;
.super Landroid/os/AsyncTask;
.source "AppObj.java"


# instance fields
.field a:Landroid/content/pm/PackageManager;

.field b:I

.field c:Lcom/a0soft/gphone/app2sd/a/j;


# direct methods
.method constructor <init>(Landroid/content/Context;Lcom/a0soft/gphone/app2sd/a/j;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 401
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 402
    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    iput-object v0, p0, Lcom/a0soft/gphone/app2sd/a/k;->a:Landroid/content/pm/PackageManager;

    .line 403
    invoke-static {}, Lcom/a0soft/gphone/a/a;->a()F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/a0soft/gphone/app2sd/a/k;->b:I

    .line 404
    iput-object p2, p0, Lcom/a0soft/gphone/app2sd/a/k;->c:Lcom/a0soft/gphone/app2sd/a/j;

    .line 405
    return-void
.end method

.method private varargs a([Lcom/a0soft/gphone/app2sd/a/g;)Lcom/a0soft/gphone/app2sd/a/g;
    .locals 8
    .parameter

    .prologue
    const/4 v0, 0x0

    .line 410
    aget-object v0, p1, v0

    .line 411
    invoke-static {v0}, Lcom/a0soft/gphone/app2sd/a/g;->b(Lcom/a0soft/gphone/app2sd/a/g;)Landroid/content/pm/PackageInfo;

    move-result-object v1

    if-nez v1, :cond_0

    .line 416
    :try_start_0
    iget-object v1, p0, Lcom/a0soft/gphone/app2sd/a/k;->a:Landroid/content/pm/PackageManager;

    iget-object v2, v0, Lcom/a0soft/gphone/app2sd/a/g;->a:Ljava/lang/String;

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/a0soft/gphone/app2sd/a/g;->a(Lcom/a0soft/gphone/app2sd/a/g;Landroid/content/pm/PackageInfo;)Landroid/content/pm/PackageInfo;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 425
    :cond_0
    invoke-static {v0}, Lcom/a0soft/gphone/app2sd/a/g;->b(Lcom/a0soft/gphone/app2sd/a/g;)Landroid/content/pm/PackageInfo;

    move-result-object v1

    iget-object v1, v1, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    if-nez v1, :cond_2

    .line 457
    :cond_1
    :goto_0
    return-object v0

    .line 421
    :catch_0
    move-exception v0

    const/4 v0, 0x0

    goto :goto_0

    .line 427
    :cond_2
    invoke-static {v0}, Lcom/a0soft/gphone/app2sd/a/g;->b(Lcom/a0soft/gphone/app2sd/a/g;)Landroid/content/pm/PackageInfo;

    move-result-object v1

    iget-object v1, v1, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    iget-object v2, p0, Lcom/a0soft/gphone/app2sd/a/k;->a:Landroid/content/pm/PackageManager;

    invoke-virtual {v1, v2}, Landroid/content/pm/ApplicationInfo;->loadIcon(Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 428
    if-eqz v1, :cond_1

    .line 430
    invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v2

    .line 431
    invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v3

    .line 433
    iget v4, p0, Lcom/a0soft/gphone/app2sd/a/k;->b:I

    .line 434
    iget v5, p0, Lcom/a0soft/gphone/app2sd/a/k;->b:I

    .line 436
    if-ne v2, v4, :cond_3

    if-eq v3, v5, :cond_4

    .line 437
    :cond_3
    int-to-float v6, v2

    int-to-float v7, v3

    div-float/2addr v6, v7

    .line 438
    if-le v2, v3, :cond_5

    .line 439
    int-to-float v2, v4

    div-float/2addr v2, v6

    float-to-int v2, v2

    move v3, v4

    .line 445
    :goto_1
    :try_start_1
    iget v4, p0, Lcom/a0soft/gphone/app2sd/a/k;->b:I

    iget v5, p0, Lcom/a0soft/gphone/app2sd/a/k;->b:I

    sget-object v6, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v4, v5, v6}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v4

    .line 446
    new-instance v5, Landroid/graphics/Canvas;

    invoke-direct {v5, v4}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 448
    iget v6, p0, Lcom/a0soft/gphone/app2sd/a/k;->b:I

    sub-int/2addr v6, v3

    div-int/lit8 v6, v6, 0x2

    iget v7, p0, Lcom/a0soft/gphone/app2sd/a/k;->b:I

    sub-int/2addr v7, v2

    div-int/lit8 v7, v7, 0x2

    invoke-virtual {v1, v6, v7, v3, v2}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 449
    invoke-virtual {v1, v5}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 450
    new-instance v1, Landroid/graphics/drawable/BitmapDrawable;

    invoke-direct {v1, v4}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 456
    :cond_4
    invoke-static {v0, v1}, Lcom/a0soft/gphone/app2sd/a/g;->a(Lcom/a0soft/gphone/app2sd/a/g;Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;

    goto :goto_0

    .line 440
    :cond_5
    if-le v3, v2, :cond_6

    .line 441
    int-to-float v2, v5

    mul-float/2addr v2, v6

    float-to-int v2, v2

    move v3, v2

    move v2, v5

    goto :goto_1

    .line 452
    :catch_1
    move-exception v1

    goto :goto_0

    :cond_6
    move v2, v5

    move v3, v4

    goto :goto_1
.end method

.method private a(Lcom/a0soft/gphone/app2sd/a/g;)V
    .locals 1
    .parameter

    .prologue
    .line 463
    if-nez p1, :cond_0

    .line 471
    :goto_0
    return-void

    .line 465
    :cond_0
    invoke-static {p1}, Lcom/a0soft/gphone/app2sd/a/g;->c(Lcom/a0soft/gphone/app2sd/a/g;)Z

    .line 466
    const/4 v0, 0x0

    invoke-static {p1, v0}, Lcom/a0soft/gphone/app2sd/a/g;->a(Lcom/a0soft/gphone/app2sd/a/g;Landroid/content/pm/PackageInfo;)Landroid/content/pm/PackageInfo;

    .line 468
    iget-object v0, p0, Lcom/a0soft/gphone/app2sd/a/k;->c:Lcom/a0soft/gphone/app2sd/a/j;

    invoke-interface {v0}, Lcom/a0soft/gphone/app2sd/a/j;->a()V

    .line 470
    invoke-static {}, Ljava/lang/System;->gc()V

    goto :goto_0
.end method


# virtual methods
.method protected final bridge synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 395
    check-cast p1, [Lcom/a0soft/gphone/app2sd/a/g;

    invoke-direct {p0, p1}, Lcom/a0soft/gphone/app2sd/a/k;->a([Lcom/a0soft/gphone/app2sd/a/g;)Lcom/a0soft/gphone/app2sd/a/g;

    move-result-object v0

    return-object v0
.end method

.method protected final bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 395
    check-cast p1, Lcom/a0soft/gphone/app2sd/a/g;

    invoke-direct {p0, p1}, Lcom/a0soft/gphone/app2sd/a/k;->a(Lcom/a0soft/gphone/app2sd/a/g;)V

    return-void
.end method
